package cn.juque.datapipeline.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

/**
 * @author JUQUE
 * @version 1.0.0
 * <ul>
 *  <li>simple-generator</li>
 *  <li>任务信息</li>
 * </ul>
 * {@code @date} 2023-03-31 14:27:04
 **/
@Data
@TableName(value = "DB_TASK_INFO")
public class TaskInfo extends BaseEntity {

    /**
     * 主键
     */
    @TableId(value = "ID", type = IdType.ASSIGN_UUID)
    private String id;

    /**
     * 任务名称
     */
    @TableField(value = "TASK_NAME")
    private String taskName;

    /**
     * 任务类型：1-预检；2-采数
     */
    @TableField(value = "TASK_TYPE")
    private Integer taskType;

    /**
     * 任务状态
     */
    @TableField(value = "TASK_STATUS")
    private Integer taskStatus;

    /**
     * 源库
     */
    @TableField(value = "SOURCE_DATABASE")
    private String sourceDatabase;

    /**
     * 脚本
     */
    @TableField(value = "SCRIPT_ID")
    private String scriptId;

    /**
     * 单次数据偏移
     */
    @TableField(value = "DATA_OFFSET")
    private Integer dataOffset;

    /**
     * 目标库
     */
    @TableField(value = "TARGET_DATABASE")
    private String targetDatabase;

    /**
     * 目标表
     */
    @TableField(value = "TARGET_TABLE")
    private String targetTable;

    /**
     * 目标库操作类型
     */
    @TableField(value = "TARGET_OPERATE_TYPE")
    private Integer targetOperateType;

    /**
     * 执行前是否清数
     */
    @TableField(value = "CLEAR_BY_BEFORE")
    private Integer clearByBefore;

    /**
     * 备注
     */
    @TableField(value = "REMARK")
    private String remark;

}
